package com.miracle9.game.dao;
import com.miracle9.game.entity.LevelInfo;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

@Repository
public class LevelInfoServiceDao extends SqlOperating<LevelInfo, Integer>
{
  @Cacheable(value={"springCache"}, key="'getInfoByLevel'+#level")
  public LevelInfo getLevelInfoByLevel(int level)
  {
    return (LevelInfo)q_CreateSqlFilter("from LevelInfo where level=?", new Object[] { Integer.valueOf(level) });
  }
}
